package org.example;

import java.util.HashMap;
import java.util.Map;

public class Demo {

    public static void main(String[] args) {
        System.out.println(Integer.MAX_VALUE);
        long x = ((long) Integer.MAX_VALUE) + 1;
        System.out.println(x);
        System.out.println((int) x);

        int y = Integer.parseUnsignedInt(String.valueOf(x));
        System.out.println(y);
//        System.out.println(Byte.MAX_VALUE);
//        System.out.println((byte)(Byte.MAX_VALUE*2-1));
//        System.out.println(Byte.MIN_VALUE);
//        System.out.println((byte)(Byte.MIN_VALUE + 1));


        Map<String, String> a1 = new HashMap<>();
        a1.put("name", "a1");
        Map<String, String> a2 = new HashMap<>();
        a2.put("name", "a2");
        new Demo().swap(a1, a2);
        System.out.println(a1.get("name"));
        System.out.println(a2.get("name"));
    }

    private void swap(Map<String, String> before, Map<String, String> after) {
        Map<String, String> t = before;
        before = after;
        after = t;
        System.out.println(before.get("name"));
        System.out.println(after.get("name"));
    }
}
